The present invention relates generally to database software, and more particularly to relational databases.
Employing computer systems allows management of large amounts of data. This data is generally stored in databases. These databases comprise of a storage unit for storing this data. The storage unit may be any suitable storage medium, such as a hard disk. The storage unit and the data stored thereon are managed by a computer application, referred to as database software. The storage unit is controlled by a computer system on which the database software is run.
Prior art databases are mostly relational databases. These databases are organized as a set of formally-described tables from which data can be accessed or reassembled in many different ways without having to reorganize the database table. The tables are also called relations.
The sets of tables contain data organized into predefined categories. Each table contains one or more data categories in columns. Each row contains a unique instance of data for the categories defined by the columns. For example, a typical address book database may include a table that describes a xe2x80x9ccontactxe2x80x9d with the name, surname, street, city, telephone number and birthday. A user of the database could obtain a view of the database that meets the user""s needs; for example, the xe2x80x9ccontactxe2x80x9d may be described only by surname, telephone number and birthday.
While creating a relational database, the domain of possible values in a data column and further constraints that may apply to that data value have to be defined. The definition of a relational database results in a table of metadata or formal description of the tables, columns, domains and constraints.
Such a relational database has the advantage of being relatively easy to create and access. Relational databases are also relatively easy to extend, because after the original database creation, a new data category can be added without requiring that all existing applications be modified. The standard user and application program interface to a relational database is the structured query language (SQL).
One disadvantage of relational databases is that their data storage structure is flat. All information of the database is stored in the relations. The structure between the relations is not stored. This means that information contained in these structures of the data is lost for the database when the data is stored. Another disadvantage of the prior art is that these databases require the set up of schemas by the database administrator to define the categories of the columns in the tables. This is laborious and confusing, since it may differ between the various databases. This is particularly unpleasant if several databases are to be brought into cooperation.
In the prior art object oriented databases are also known. These comprise objects and classes to which these objects belong. The objects may include values as well as methods. The classes refer to characteristics of objects relating to their potential further processing or handling. However, the classes are not related to the content of data as such, and therefore do not facilitate the management of the data with respect to the substantive information contained therein.
One object of the present invention is to overcome these disadvantages and to provide a database which is easy to manage, particularly with respect to the substantive information contained in the database.
These and other objects are achieved by a method for storing and managing data on a storage medium connected to a computer system, wherein said data comprises a plurality of data elements and a plurality of tags, wherein each of said data elements is assigned one of said tags to form a plurality of pairs each comprising at least one of said data elements and one of said tags, wherein each of said pairs is assigned a position in a hierarchical structure, characterized in that each of said pairs is stored and managed on said storage medium together with a pair-individual hierarchy indicator indicating said position of said pair in said hierarchical structure.
A computer system which is able to carry out this inventive method comprises a processor, a storage medium, an input device and an output device. The storage medium can be a hard disk or other storage medium. This storage medium, as well as the input device and the output device, may be comprised in the computer system itself, or in another embodiment, may belong to another computer system and be connected via a data line or a network to the computer system.
The data to be stored and managed by employing this computer system may be divided into data elements and tags. In connection with an address database example, the data elements or entries would be the first name, the surname, the street, the house number, the city, the telephone numbers, the birthday and any other data element. These data elements are organized in relation to the tags. The tags describe the content of the corresponding data elements. For example, the data elements which belong to the tag xe2x80x9cstreetxe2x80x9d contain the information about the name of a street. Since these tags are organized in a hierarchical structure, the tags xe2x80x9cstreetxe2x80x9d, xe2x80x9chouse numberxe2x80x9d and xe2x80x9ccityxe2x80x9d may belong to another tag, for example the tag xe2x80x9caddressxe2x80x9d, which could be called a parent tag.
In connection with one embodiment of the present invention, storing describes the process of inserting new entries into the database, for example, a new contact in the address database, and managing describes the process of handling the various entries, like viewing, opening, amending and transmitting.
By means of the present invention the hierarchical structure of data may be conserved in the database, which means it is not lost for the database. This is achieved by employing a pair-individual hierarchy indicator indicating the position of the corresponding pair in the hierarchical structure, and being stored and managed together with the respective pair. Herein, a pair-individual hierarchy indicator may indicate the position of its related pair by describing the parent and the child(ren) of this pair in the hierarchical structure. However, this pair-individual hierarchy indicator may contain, in addition or instead, other information, for example about the grandparent, grandchildren or other relationships to other pairs in the hierarchical structure. Therefore, the pair-individual hierarchy indicator may also be called relationship attribute. Further additional information may be expressed by other attributes, for example the data type of the data element by a so-called content attribute.
By using the pair-individual hierarchy indicator in the mentioned way the method of the present invention allows the information about a pair relating to its position in the hierarchical structure to be maintained when storing this pair in a database and when further processing this pair in or in connection with this database.
In a preferred embodiment of the present invention each of the pairs is listed in an index, wherein this index contains hierarchy information about the position of each of the pairs in the hierarchical structure. This index may be initiated with the storage of the first pair and may be updated with each change in the database, for example with the storing of a new pair, with amending or changing the hierarchical position of an existing pair, or with deleting a pair from the database.
This index contains information about the data, i.e., about each data element or each pair of data elements and tags. In the scope of the present invention the index contains at least the information about the position of each data element or pair in the hierarchical structure. Therefore, the index reflects this hierarchical structure. However, according to the present invention the index may also contain additional information which could be of interest to the user, such as information related to the content of the data elements as well as information corresponding to the creation of this data element, like the storing date or the name of the author.
As a consequence, the index allows quick location of each data element or pair, respectively. In order to improve the search function, combined indexes may be also provided, this means indexes which contain hierarchical information as well as content information regarding the data elements. Information about the data element or pair is available from the index without accessing this data element or pair, because this information can be gathered from the hierarchical structure in which the pairs are arranged. For example, it is possible to find out from the index of the database if the number 16 belongs to the address, the data of birth or to the telephone number of an entry of the database.
It is preferred that the hierarchy information in the index includes the pair-individual hierarchy indicators for each pair. This may facilitate the administration of the database in that the information stored and managed together with the pairs is identical with the information registered in the index.
Preferably, said managing of said pairs comprises searching through said data on demand of a user of said computer system using a searching function allowing the following searching schemas: performing a search in said data elements, performing a search in said tags, and performing an interconnected search in said data elements and in said tags. Such a search can be carried out quickly by employing the index which reflects the hierarchical structure of the data. All necessary information needed for this kind of search can be found in this index. This kind of managing allows the user to employ the structure for achieving a better search result in less time. For example, prior art address databases allow searching for the first name of a contact. If such a contact has several first names no hierarchy between these first names is established and can be taken into account, unless the category first name is generally, that means for all contacts, subdivided into more than one first name, i.e. calling name, second name, third name, etc. A search function according to the prior art without additional subdividing between the calling, second and third name will present all contacts with the searched first name, no matter if it is the calling, second or third name.
The method of the present invention now allows the system to directly access, for example, the second name of contacts without having to introduce further categories or distinctions, simply by following the paths of the hierarchical structure, which is reflected in the index. In this example, the structure might, in a tree-like fashion, use xe2x80x9cfirst namexe2x80x9d as a branch and store therein several first names in the natural sequence of the address data. Thereby, the second or third first name may easily be searched. Frequently, the search is also faster. Regularly, this kind of search leads to more accurate results.
Preferably, said managing of said pairs comprises automatically initializing a routine when a predefined event occurs. It is further preferred that the predefined event can be a result obtained by means of a searching function. However, the predefined event may be any occurrence defined by the system administrator. The event may be defined in the database application as well as in an external application being in contact with the database application. For example, it may be desired that employees automatically receive birthday greetings on their personal birthday. In this case the event would be that a pair consisting of the tag birthday and the figures representing the birthday date of an employee equal the pair consisting of the tag birthday and the present date. The routine would be the automatic creation and dispatch of birthday greetings, potentially with the facsimile signature of the president of the company. In many applications, of course, the predefined event will be a request initiated by another system part, i.e., internally, or by a user, i.e., externally.
Another preferred feature in the management of data according to the inventive method is the displaying of the hierarchical structure of said pairs on an output device, for example a screen or a printer. This display of the hierarchical structure shows the hierarchy, preferably in the form of a tree-like representation, and allows a user to obtain an extremely quick overview of the data structure. This display facilitates the orientation in the database. It is supplemented by another optional feature of the present invention, namely the placing of data elements at any position in said hierarchical structure according to the interaction of a user. This placing may also be a re-placing, that means a change of position in the hierarchy. For example, in an address database the private address is presently considered less relevant than the business address, however, for the future this may be changed. Then it is comparably easy, when utilizing the present invention, to rearrange the private address at a place higher in the hierarchy than the business address. As stated before, the display of the structure facilitates this process, however, it is not necessary.
Another preferred method according to the present invention includes the management of the pairs of tags and data elements comprising an undo function for undoing storing and managing actions. The undo function allows cancellation of actions performed by the computer system on the storage medium, for example, the deletion of a certain pair, to remove their effect, thus keeping the stored pair.
Preferably, the data is formated in the extensible markup language (XML) format. Data thus formatted disposes of a hierarchical structure of the information and renders it easier to store this information in a database, i.e. on a storage medium, because the XML format forms a common platform which may be more easily understood by the software application managing the storage medium.
It is also preferred in the scope of the present invention that the computer system controlling the storage medium is connected to various storage mediums via a data connection, thereby enlarging storage space and rendering the database application faster. This data connection may be any link allowing the transfer of data, be it permanent or temporary.
The present invention further relates to a computer program being stored on any computer readable memory means for carrying out a method according to the present invention on a computer system, which may be a standard computer system.
In the scope of the present invention a data carrier with a computer program for carrying out a method according to the present invention on a computer system is also provided.
The present invention relates also to a database system which uses any of the above disclosed methods for storing and managing data.
Finally, the present invention relates to a method for using a computer system for carrying out a method according to any of the inventive methods for storing and managing data according to this invention.